/** 
 * @Title: UserServiceImpl.java 
 * @Package com.prs.um.usermanager.service.impl 
 * @Description: TODO 
 * @author flybonew@163.com 
 * @date 2013-1-7 上午10:53:34 
 * @version V1.0 
 */  
package com.prs.um.usermanager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.orm.hibernate3.HibernateTemplate;

import com.prs.um.usermanager.dto.User;
import com.prs.um.usermanager.service.UserService;

/** 
 * @ClassName: UserServiceImpl 
 * @Description: TODO(这里用一句话描述这个类的作用) 
 * @author flybonew@163.com
 * @date 2013-1-7 上午10:53:34 
 * 
 */
public class UserServiceImpl implements UserService{
	
	@Resource
	private HibernateTemplate hibernateTemplate;

	/*
	 * @Description: 添加用户
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public User addUser(User user) {
		this.hibernateTemplate.save(user);
		return user;
		
	}

	/*
	 * @Description: 修改用户 
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public void updateUser(User user) {
		this.hibernateTemplate.update(user);
	}

	/*
	 * @Description: 删除用户 
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public void deleteUser(User user) {
		this.hibernateTemplate.delete(user);
	}

	/*
	 * @Description: 通过userId查询用户
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public User seleteUserById(String userId) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * @Description: 通过loginId查询用户
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public User seleteUserByLoginId(String loginId) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * @Description: 查询该部门下的所有用户，若state为null时，无效有效的用户将统统查询出来
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public List<User> selectUserByDeptId(String deptId, Integer state) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * @Description: 通过职务ID查询具有该职务的所有用户，若state为null时，无效有效的用户将统统查询出来
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public List<User> selectUserByDutyId(String dutyId, Integer state) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * @Description: 通过部门名称查询出所有的用户
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public List<User> selectUserByDeptName(String deptName, Integer state) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * @Description: 通过职务名称查询出所有用户 
	 * @author flybonew@163.com
	 * @date 2013-1-7 下午2:49:52 
	 */
	@Override
	public List<User> selectUserByDutyName(String dutyName, Integer state) {
		// TODO Auto-generated method stub
		return null;
	}

}
